package com.cwm.test.proxy.general;

public class Proxy implements Subject{
    private Subject subject;

    public Proxy(Subject subject){
        this.subject = subject;
    }

    @Override
    public void request() {
        before();
        subject.request();
        after();

    }

    public void before(){
        System.out.println("called before called.");
    }

    public void after(){
        System.out.println("called after called.");
    }
}
